package com.example.dakotanews.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.dakotanews.entity.News;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface NewsMapper extends BaseMapper<News> {

    /**
     * @description 根据新闻ID查询新闻记录
     * @param newsId 新闻ID
     * @return 返回一个 新闻类
     */
    @Select("select * from dakotanews.news where id = #{newsId}")
    News selectNewsById(Integer newsId);


}
